package main

import (
	"init-database/core"
	"init-database/global"

	"init-database/initialize"
)

func main() {
	// 1. 初始化viper配置
	global.GLOBAL_VP = core.Viper()
	// 2. 初始化数据库
	global.GLOBAL_DB = initialize.Gorm()
	if global.GLOBAL_DB != nil {
		db, _ := global.GLOBAL_DB.DB()
		defer db.Close()
	}
	// 3. 初始化路由
	core.RunWindowServer()
}
